package com.ly.heart.service.impl;

import java.util.Collections;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import com.ly.heart.domain.dto.KingOtherInboundQueryDto;
import com.ly.heart.domain.vo.OtherInboundVo;
import com.ly.heart.mapper.KingOtherInboundMaterialMapper;
import com.ly.heart.service.IKingOtherInboundMaterialService;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.KingOtherInboundMaterialEntity;

import javax.annotation.Resource;

/**
 * 金蝶-其他入库单物料明细Service业务层处理
 *
 * @author cxl
 * @date 2024-08-03
 */
@Service
public class KingOtherInboundMaterialServiceImpl extends ServiceImpl<KingOtherInboundMaterialMapper,KingOtherInboundMaterialEntity> implements IKingOtherInboundMaterialService {

    @Resource
    private KingOtherInboundMaterialMapper kingOtherInboundMaterialMapper;


    /**
     * 查询金蝶-其他入库单物料明细
     *
     * @param id 金蝶-其他入库单物料明细ID
     * @return 金蝶-其他入库单物料明细
     */
    @Override
    public KingOtherInboundMaterialEntity selectKingOtherInboundMaterialEntityById(String id)
    {
        return kingOtherInboundMaterialMapper.selectKingOtherInboundMaterialEntityById(id);
    }

    /**
     * 查询金蝶-其他入库单物料明细列表
     *
     * @param kingOtherInboundMaterialEntity 金蝶-其他入库单物料明细
     * @return 金蝶-其他入库单物料明细
     */
    @Override
    public List<KingOtherInboundMaterialEntity> selectKingOtherInboundMaterialEntityList(KingOtherInboundMaterialEntity kingOtherInboundMaterialEntity)
    {
        return kingOtherInboundMaterialMapper.selectKingOtherInboundMaterialEntityList(kingOtherInboundMaterialEntity);
    }

    /**
     * 新增金蝶-其他入库单物料明细
     *
     * @param kingOtherInboundMaterialEntity 金蝶-其他入库单物料明细
     * @return 结果
     */
    @Override
    public int insertKingOtherInboundMaterialEntity(KingOtherInboundMaterialEntity kingOtherInboundMaterialEntity)
    {
        kingOtherInboundMaterialEntity.setCreateTime(DateUtils.getNowDate());
        return kingOtherInboundMaterialMapper.insertKingOtherInboundMaterialEntity(kingOtherInboundMaterialEntity);
    }

    /**
     * 修改金蝶-其他入库单物料明细
     *
     * @param kingOtherInboundMaterialEntity 金蝶-其他入库单物料明细
     * @return 结果
     */
    @Override
    public int updateKingOtherInboundMaterialEntity(KingOtherInboundMaterialEntity kingOtherInboundMaterialEntity)
    {
        return kingOtherInboundMaterialMapper.updateKingOtherInboundMaterialEntity(kingOtherInboundMaterialEntity);
    }

    /**
     * 批量删除金蝶-其他入库单物料明细
     *
     * @param ids 需要删除的金蝶-其他入库单物料明细ID
     * @return 结果
     */
    @Override
    public int deleteKingOtherInboundMaterialEntityByIds(String[] ids)
    {
        return kingOtherInboundMaterialMapper.deleteKingOtherInboundMaterialEntityByIds(ids);
    }

    /**
     * 删除金蝶-其他入库单物料明细信息
     *
     * @param id 金蝶-其他入库单物料明细ID
     * @return 结果
     */
    @Override
    public int deleteKingOtherInboundMaterialEntityById(String id)
    {
        return kingOtherInboundMaterialMapper.deleteKingOtherInboundMaterialEntityById(id);
    }

    @Override
    public List<OtherInboundVo> getOtherInboundPageList(KingOtherInboundQueryDto queryDto) {
        return kingOtherInboundMaterialMapper.getOtherInboundPageList(queryDto);
    }

}
